<!---->
<%= form_for(:session, :url => {:action => 'update'}, :method => 'put', :html => {:class=>'form-horizontal'}) do |t| %>
	<fieldset>
		<legend>
    <%= link_to '焦点图列表', carousels_path %>
    <%= link_to '文章列表', '/topics/category/1' %>
    </legend>
  <div class="control-group">
    <label class="control-label">标题</label>
    <div class="controls">
    <%= t.text_field :title, :value => @carousel.title %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">链接</label>
    <div class="controls">
    <%= t.text_field :linkto, :value => @carousel.linkto %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">图片</label>
    <div class="controls">
      <%= image_tag @carousel.image_url(:preview).to_s %><br />
      <%= t.file_field :image %>
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">显示</label>
    <div class="controls">
      <%= check_box_tag 'session[site]', 1, @carousel.page == 1 ? true : false %>超首
      <%= check_box_tag 'session[page]', 1, @carousel.site == 1 ? true : false %>网站
    </div>
  </div>
  <div class="control-group">
    <label class="control-label">状态</label>
    <div class="controls">
      <%= radio_button_tag 'session[status]',0, @carousel.status == 0 ? true : false, :class => 'new'  %>启用
      <%= radio_button_tag 'session[status]',1, @carousel.status == 1 ? true : false, :class => 'new'  %>禁用
    </div>
  </div>
  <div class="control-group">
    <div class="controls">
      <input type="hidden" id="id" name="id" value="<%= @carousel.id %>">
      <button type="submit" class="btn">修改</button>
    </div>
  </div>
</fieldset>
<% end %>
<!---->
